package com.example.tao.smartcar;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.tao.smartcar.bluetooth.BluetoothScanActivity;

public class MainActivity extends BaseActivity implements View.OnClickListener{

    private Button bluetoothBtn, wifiBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        initView();
    }

    private void initView() {
        bluetoothBtn = (Button) this.findViewById(R.id.bluetooth_btn);
        wifiBtn = (Button)this.findViewById(R.id.wifi_btn);

        bluetoothBtn.setOnClickListener(this);
        wifiBtn.setOnClickListener(this);
    }


    @Override
    public void onClick(View view) {
        switch(view.getId()) {
            case R.id.bluetooth_btn:
                startActivity(new Intent(MainActivity.this, BluetoothScanActivity.class));
                break;
            case R.id.wifi_btn:

                break;
        }
    }
}
